import request from '@/utils/request'

// 查询主体列表
export function entityList(query) {
  return request({
    url: '/entity/info/list',
    method: 'get',
    params: query
  })
}

// 删除主体信息
export function delEntityInfo(entityId) {
  return request({
    url: '/entity/info/' + entityId,
    method: 'delete'
  })
}

// 停产
export function stopEntity(entityId) {
  return request({
    url: '/entity/info/stop/' + entityId,
    method: 'put'
  })
}

// 注销
export function cancelEntity(entityId) {
  return request({
    url: '/entity/info/cancel/' + entityId,
    method: 'put'
  })
}

// 恢复
export function entityToNormal(entityId) {
  return request({
    url: '/entity/info/toNormal/' + entityId,
    method: 'put'
  })
}

// 审核列表数据
export function entityAuthList(query) {
  return request({
    url: '/entity/auth/list',
    method: 'get',
    params: query
  })
}

// 审核
export function authEntity(entityId, param) {
  return request({
    url: '/entity/auth/' + entityId,
    method: 'put',
    params: param
  })
}
